/*
 *  ATrackEffect.h
 *  libavid
 *
 *  Created by Peter on 25.02.12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef A_TRACK_EFFECT_H
#define A_TRACK_EFFECT_H

#include "ATrackGroup.h"

// Version: 6 (MC 7 old versioning scheme), MC 5.0.3
// Fixme: Inheritance for ATrackEffect and ATransEffect isn't entirely clear.
// Both seem to share the end part, but ATransEffect has a class inbetween in the
// inheritance structure (version 1, only one member, that being OMFI:TRAN:CutPoint)?!
// Also, the version is 5 for ATransEffect, even though the data is identical. 
// Maybe actual duplication on Avid's part?!
// I guess this should be : public AEffect : public ATrackGroup (though AEffect probably doesn't write anything at all, not even tag and version)
class ATrackEffect : public ATrackGroup
{

public:
	
	A_DECLARE_CLASS( 'TKFX', ATrackEffect, ATrackGroup );
	
	virtual void readFromStream( AStream& str, const AObjDoc& objd );
	virtual void dump( std::ostream& str ) const;
	
	Int32 _leftLength;        // OMFI:TKFX:MC:LeftLength: 15
	Int32 _rightLength;       // OMFI:TKFX:MC:RightLength: 15
	
	// Seems to be a GlobalInfo struct. If it comes up again, we should probably refactor it into its own class
	Int16 _globalInfoVersion; // OMFI:TNFX:MC:GlobalInfoVersion: 2
	Int32 _kfCurrent;         // OMFI:TNFX:MC:GlobalInfo.kfCurrent: 0
	Int32 _kfSmooth;          // OMFI:TNFX:MC:GlobalInfo.kfSmooth: 0
	Int16 _colorItem;         // OMFI:TNFX:MC:GlobalInfo.colorItem: 1
	Int16 _quality;           // OMFI:TNFX:MC:GlobalInfo.quality: 1
	Int8  _isReversed;        // OMFI:TNFX:MC:GlobalInfo.isReversed: 0
	bool  _aspectOn;          // OMFI:TNFX:MC:GlobalInfo.aspectOn: False
	
	UInt32 _keyFrameList;     // OMFI:TKFX:MC:KeyFrameList: 0x00000096 // Probably FXPS (AEffectKFList*)
	bool   _forceSoftware;    // OMFI:TNFX:MC:ForceSoftware: False
	bool   _neverHardware;    // OMFI:TKFX:MC:NeverHardware: False

	// PClass Extension TrackMan
	UInt32 _trackMan;         // OMFI:TKFX:MC:TrackMan: 0x00000000, most likely TrackMan*
	
};

#endif /*Inclusion Guard*/